{include file='fcworker/fc_head'}
<style >
    .btn-div{
        width: 100%;
        text-align: center;
        margin: 30px auto;
    }
    .btn{
         width: 184px;
         height: 35px;
         background-color: #5c99f7;
         border-radius: 50px;
         border: 0;
         margin-top: 20px;
         color: #fff;
         font-size: 15px;
         font-weight: 400;
     }
</style>
<div id="mescroll" class="mescroll">
    <div id="app">
        <div class="setTitle">
            代理注册
        </div>
        <div class="h167"></div>
        <div class="setActive">
            <div class="actTit">
                归属员工：【{$superior_info['username']}】{$superior_info['mobile']}
            </div>
            <form action='{php echo "/".createMobileUrl($do,array("op"=>"save","themeid"=>$themeid,"superior"=>$_P['superior']));}' method="post" onsubmit="return check2()">
            <ul>
                <li>
                    <p>姓名</p>
                    <input type="text" maxlength="10" id="username" name="username" value="" placeholder="请输入姓名">
                </li>
                <li>
                    <p>手机号</p>
                    <input type="number" oninput="if(value.length>11)value=value.slice(0,11)"  id="mobile" name="mobile" value="" placeholder="请输入手机号">
                </li>
            </ul>
            <div class="btn-div martop80">
                <button class="btn" id="sub1" type="submit">提交</button>
            </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    const mescroll = new MeScroll("mescroll", {
        down: {
            auto: false,
            callback: () => {
                mescroll.endSuccess();
                setTimeout(() => {
                    window.location.reload();
                },500)
            }
        },
        up: {
            use: false
        }
    })
    function check2() {
        var username = $('#username').val();
        if(username == ''){
            alert('请输入您的姓名');
            return false;
        }
        var mobile = $('#mobile').val();
        if(mobile.length == 0){
            alert('请输入您的手机号');
            return false;
        }
        if(mobile.length != 11){
            alert('请输入您的正确的手机号');
            return false;
        }
    }
</script>
<script type="text/javascript">
    /*禁示分享当前页面*/
    function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    }

    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    } else {
        onBridgeReady();
    }
</script>